unit Abrecomprovantenaofiscalvinculado;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, Mask;

type
  TFormAbreComprovanteNaoFiscalVinculado = class(TForm)
    Label5: TLabel;
    Label3: TLabel;
    ComboBox1: TComboBox;
    Label2: TLabel;
    MaskEdit2: TMaskEdit;
    MaskEdit1: TMaskEdit;
    BitBtn1: TBitBtn;
    Label1: TLabel;
    Edit1: TEdit;
    Label4: TLabel;
    Edit2: TEdit;
    Label6: TLabel;
    Edit3: TEdit;
    procedure BitBtn1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormAbreComprovanteNaoFiscalVinculado: TFormAbreComprovanteNaoFiscalVinculado;

implementation

uses principal, funcoesapoio;

{$R *.dfm}

procedure TFormAbreComprovanteNaoFiscalVinculado.BitBtn1Click(
  Sender: TObject);
var valor:String;
begin
        valor:=Maskedit1.Text; virgula:=pos(',',valor);
        Delete(valor, virgula, 1);
        FormPrincipal.ValorTEF:=valor;
        FormPrincipal.PagtoTEF:=ComboBox1.Text;
        FormPrincipal.nCOO:=MaskEdit2.Text;

end;

procedure TFormAbreComprovanteNaoFiscalVinculado.FormShow(Sender: TObject);
var i:integer;
begin
        CapturaDadosProgamadosECF(2); // Captura Meios de Pagamento
        for i:=1 to 20 do begin
                if not (MeiosPagamento[i].Legenda='') then begin
                        Combobox1.Items.ADD(MeiosPagamento[i].Legenda);
                end;
        end;
        try
                ComboBox1.Text:=MeiosPagamento[1].Legenda;
        except;
        end;
        if FormAbreComprovantenaofiscalvinculado.height=141 then begin
                edit1.visible:=false; edit2.visible:=false; edit3.visible:=false;
                label1.visible:=false; label4.visible:=false; label6.visible:=false;
        end
        else begin
                edit1.visible:=true; edit2.visible:=true; edit3.visible:=true;
                label1.visible:=true; label4.visible:=true; label6.visible:=true;
        end

end;

end.
